package com.shaoshaohuo.app.adapter;

import java.util.List;

import com.shaoshaohuo.app.R;
import com.shaoshaohuo.app.entity.BusinessSeller;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class BusinessRecordAdapter<T> extends MyBaseAdapter<BusinessSeller> {

	public BusinessRecordAdapter(Context ctx, List<BusinessSeller> list, boolean flag) {
		super(ctx, list, flag);
	}

	@Override
	public View getView(int pos, View convertView, ViewGroup group) {

		ViewHolder holder;
		if (convertView == null) {
			convertView = View.inflate(context, R.layout.view_business_history_item, null);
			holder = new ViewHolder();
			holder.titleText = (TextView) convertView.findViewById(R.id.textview_left);
			holder.countText = (TextView) convertView.findViewById(R.id.textview_right);
			convertView.setTag(holder);
		} else {
			holder = (ViewHolder) convertView.getTag();
		}

		BusinessSeller item = list.get(pos);

		holder.titleText.setText("买家:"+item.getSupplymarket());
		holder.countText.setText("供应产品:"+item.getCatname());
//		 detailText.setonc
		 
		return convertView;
	}

	static class ViewHolder {
		TextView titleText;
		TextView countText;
	}

}
